package com.structure.compositePattern.model.vo;

import lombok.Data;

/**
 * 决策返回对象信息
 *
 * @author xiaobing
 * @version 1.0
 * @date 2021/9/8 8:07 下午
 */
@Data
public class EngineResult {
    /**
     * 执行结果
     */
    private boolean isSuccess;

    /**
     * 用户id
     */
    private String userId;
    /**
     * 规则树id
     */
    private Long treeId;
    /**
     * 果实节点ID
     */
    private Long nodeId;
    /**
     * 奖励结果
     */
    private String nodeValue;

    public EngineResult() {
    }

    public EngineResult(boolean isSuccess) {
        this.isSuccess = isSuccess;
    }

    public EngineResult(String userId, Long treeId, Long nodeId, String nodeValue) {
        this.isSuccess = true;
        this.userId = userId;
        this.treeId = treeId;
        this.nodeId = nodeId;
        this.nodeValue = nodeValue;
    }
}
